<%--
  Created by IntelliJ IDEA.
  User: 14533
  Date: 2021/10/30
  Time: 13:08
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<head>
    <meta charset="UTF-8">
    <title></title>

    <link rel="stylesheet" href="css/amazeui.min.css">
    <link rel="stylesheet" href="css/admin.css">
    <style>
        .admin-main{
            padding-top: 0px;
        }
    </style>
</head>
<body>

<div class="am-cf admin-main">
    <!-- content start -->
    <div class="admin-content">
        <div class="admin-content-body">
            <div class="am-g">
                <form class="am-form am-form-horizontal" action="editUser" method="post" style="padding-top: 30px;" target="_parent">
                    <input value="${employee.eid}" name="eid" type="hidden">
                    <div class="am-form-group">
                        <label for="user-name" class="am-u-sm-3 am-form-label">
                            员工姓名
                        </label>
                        <div class="am-u-sm-9">
                            <input id="roleName" required="" placeholder="请输入员工姓名" value="${employee.realname}" name="realname" type="text">
                            <small id="helpRole">输入员工姓名。</small>
                        </div>
                    </div>
                    <div class="am-form-group">
                        <label for="username" class="am-u-sm-3 am-form-label">
                            用户名
                        </label>
                        <div class="am-u-sm-9">
                            <input type="text" value="${employee.ename}" name="ename" placeholder="请输入用户用户名"  />
                            <small>输入用户名。</small>
                        </div>
                    </div>
                    <div class="am-form-group">
                        <label for="user-name" class="am-u-sm-3 am-form-label">
                            密码
                        </label>
                        <div class="am-u-sm-9">
                            <input type="password" value="${employee.epass}" name="epass" placeholder="请输入用户密码"  />
                            <small>输入密码。</small>
                        </div>
                    </div>
                    <div class="am-form-group">
                        <label for="user-name" class="am-u-sm-3 am-form-label">
                            性别
                        </label>
                        <div class="am-u-sm-9">
                            <c:if test="${employee.esex==0}">
                                <input type="radio" name="esex" value="0" checked="checked" /> 男
                                <input type="radio" name="esex" value="1" style="margin-left: 30px;"/> 女<br>
                            </c:if>
                            <c:if test="${employee.esex==1}">
                                <input type="radio" name="esex" value="0" /> 男
                                <input type="radio" name="esex" value="1" checked="checked" style="margin-left: 30px;" /> 女 <br>
                            </c:if>
                            <small>选择性别。</small>
                        </div>
                    </div>
                    <div class="am-form-group">
                        <label for="user-name" class="am-u-sm-3 am-form-label">
                            所在部门
                        </label>
                        <div class="am-u-sm-9">
                            <select placeholder="请选择所在部门" name="did">
                                <c:if test="${employee.did==1}">
                                    <option value="1" selected>人事部</option>
                                    <option value="2">行政部</option>
                                    <option value="3">财务部</option>
                                    <option value="4">销售部</option>
                                    <option value="5">安保部</option>
                                    <option value="6">开发部</option>
                                    <option value="7">运维部</option>
                                    <option value="8">生产部</option>
                                </c:if>

                                <c:if test="${employee.did==2}">
                                    <option value="1">人事部</option>
                                    <option value="2" selected>行政部</option>
                                    <option value="3">财务部</option>
                                    <option value="4">销售部</option>
                                    <option value="5">安保部</option>
                                    <option value="6">开发部</option>
                                    <option value="7">运维部</option>
                                    <option value="8">生产部</option>
                                </c:if>

                                <c:if test="${employee.did==3}">
                                    <option value="1">人事部</option>
                                    <option value="2">行政部</option>
                                    <option value="3" selected>财务部</option>
                                    <option value="4">销售部</option>
                                    <option value="5">安保部</option>
                                    <option value="6">开发部</option>
                                    <option value="7">运维部</option>
                                    <option value="8">生产部</option>
                                </c:if>

                                <c:if test="${employee.did==4}">
                                    <option value="1">人事部</option>
                                    <option value="2">行政部</option>
                                    <option value="3">财务部</option>
                                    <option value="4" selected>销售部</option>
                                    <option value="5">安保部</option>
                                    <option value="6">开发部</option>
                                    <option value="7">运维部</option>
                                    <option value="8">生产部</option>
                                </c:if>

                                <c:if test="${employee.did==5}">
                                    <option value="1">人事部</option>
                                    <option value="2">行政部</option>
                                    <option value="3">财务部</option>
                                    <option value="4">销售部</option>
                                    <option value="5" selected>安保部</option>
                                    <option value="6">开发部</option>
                                    <option value="7">运维部</option>
                                    <option value="8">生产部</option>
                                </c:if>

                                <c:if test="${employee.did==6}">
                                    <option value="1">人事部</option>
                                    <option value="2">行政部</option>
                                    <option value="3">财务部</option>
                                    <option value="4">销售部</option>
                                    <option value="5">安保部</option>
                                    <option value="6" selected>开发部</option>
                                    <option value="7">运维部</option>
                                    <option value="8">生产部</option>
                                </c:if>

                                <c:if test="${employee.did==7}">
                                    <option value="1">人事部</option>
                                    <option value="2">行政部</option>
                                    <option value="3">财务部</option>
                                    <option value="4">销售部</option>
                                    <option value="5">安保部</option>
                                    <option value="6">开发部</option>
                                    <option value="7" selected>测试部</option>
                                    <option value="8">运维部</option>
                                </c:if>

                                <c:if test="${employee.did==8}">
                                    <option value="1">人事部</option>
                                    <option value="2">行政部</option>
                                    <option value="3">财务部</option>
                                    <option value="4">销售部</option>
                                    <option value="5">安保部</option>
                                    <option value="6">开发部</option>
                                    <option value="7">测试部</option>
                                    <option value="8" selected>运维部</option>
                                </c:if>

                            </select>
                            <!--<textarea rows="" cols="50" placeholder="请输入用户密码" name="roleDesc"></textarea>-->
                            <small>选择所在部门。</small>
                        </div>
                    </div>
                    <div class="am-form-group">
                        <label for="user-name" class="am-u-sm-3 am-form-label">
                            用户角色
                        </label>
                        <div class="am-u-sm-9">
                            <select placeholder="请选择用户角色" name="position">
                                <c:if test="${employee.position==2}">
                                    <option value="2" selected>员工</option>
                                    <option value="1">经理</option>
                                    <option value="0">老板</option>
                                </c:if>
                                <c:if test="${employee.position==1}">
                                    <option value="2">员工</option>
                                    <option value="1" selected>经理</option>
                                    <option value="0">老板</option>
                                </c:if>
                                <c:if test="${employee.position==0}">
                                    <option value="2">员工</option>
                                    <option value="1">经理</option>
                                    <option value="0" selected>老板</option>
                                </c:if>
                            </select>
                            <small>请选择用户角色。</small>
                        </div>
                    </div>

                    <div class="am-form-group">
                        <label for="username" class="am-u-sm-3 am-form-label">
                            薪资
                        </label>
                        <div class="am-u-sm-9">
                            <input type="text" value="${employee.sal}" name="sal" placeholder="请输入员工薪资"  />
                            <small>输入薪资。</small>
                        </div>
                    </div>

                    <div class="am-form-group">
                        <div class="am-u-sm-9 am-u-sm-push-3">
                            <input id="addRole" class="am-btn am-btn-success" value="编辑员工" type="submit">
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
</body>
</html>
